home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
progs
/
editor
/
frexxed
/
fpl
/
quitandkill.fpl
< prev
next >
Wrap
Text File
|
1995-08-15
|
510b
|
31 lines
export int QuitAndKill_hook(int bufferid)
{
int ret = 0;
int firstid = GetBufferID();
int id = firstid;
int numbufs = 0;
if (!bufferid)
{
bufferid = GetBufferID();
}
do
{
if(ReadInfo("type") & 1)
numbufs+=ReadInfo("shared");
id = NextBuffer(id);
if (id == firstid)
{
id = 0;
}
} while (id);
if(numbufs == 1)
{
Clean("QuitAll();");
}
}
Hook("Kill", "QuitAndKill_hook"); /* Patch Kill() with QuitAndKill_hook()! */